package person.zjh.kaoyansharehub.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import person.zjh.kaoyansharehub.dto.PageReplyDTO;
import person.zjh.kaoyansharehub.dto.ReplyCreateDTO;
import person.zjh.kaoyansharehub.result.PageResult;
import person.zjh.kaoyansharehub.result.Result;
import person.zjh.kaoyansharehub.service.ReplyService;

/**
 * @description: TODO
 * @author 郑佳豪
 * @date 2025/2/22 16:21
 * @version 1.0
 */
@RestController
@RequestMapping("/front/reply")
@Slf4j
@RequiredArgsConstructor
public class ReplyController {

    private final ReplyService replyService;

    @PostMapping("/saveReply")
    public Result saveReply(@RequestBody ReplyCreateDTO requestParam){
        log.info("创建回复列表的参数：{}",requestParam);
        return replyService.saveReply(requestParam);
    }

    @PostMapping("/getReplyList")
    public PageResult getReplyList(@RequestBody PageReplyDTO requestParam){
        log.info("获取回复列表的参数：{}",requestParam);
        return replyService.getReplyList(requestParam);
    }

}
